<!-- BEGIN sprint/show_burndown.rhtml -->

<link rel="stylesheet" type="text/css" href="/javascripts/CanvasGraph/page.css" />
<script src="/javascripts/CanvasGraph/MochiKit.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Base.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Iter.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Logging.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/DateTime.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Format.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Async.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/DOM.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/LoggingPane.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Color.js" type="text/javascript"></script>show
<script src="/javascripts/CanvasGraph/Signal.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/Visual.js" type="text/javascript"></script>
<script src="/javascripts/CanvasGraph/CanvasGraph.js" type="text/javascript"></script>
<script language="javascript">
var gline = null;

function generate_squares(n) {
    var result = new Array();
    
    for (var i = 10; i >= n; i--) {
        result[result.length] = [i, i*i];
    }
    return result;
}


  
function lineplot() {
    if (CanvasGraph.isSupported("lineplot")) {
        gline = new CanvasGraph("lineplot");    
        gline.padding = {top: 10, left: 50, bottom: 30, right: 20};
        gline.fontSize = 8;
        gline.xtickSeparation = 80;
        
        gline.setDataset("burndown", [
		<%
		hours_per_day_array = @sprint.hours_per_day
		%>
		
		<% hours_per_day_array.each_index do |index | %>
		<%= "[#{index},#{hours_per_day_array[index]}]," %>
		<% end %>
		])           
        gline.drawLinePlot({
                            "burndown": Color.blueColor()});
    }
}   

addLoadEvent(lineplot);

function testSupport() {
    log(CanvasGraph.isSupported());
}

addLoadEvent(testSupport);
</script>    
<div style="position: relative; width: 600px;" class="center"><canvas style="position: relative; z-index: 1;" width="600" height="300" id="lineplot"></canvas>
</div>


<!-- END sprint/show_burndown.rhtml -->